package com.device.grant.dao;

import java.util.List;
import java.util.Map;

import com.device.grant.pojo.Appointment;
import com.device.grant.utils.ColumnCompator;

public interface AppointmentDao {

	List<Appointment> queryAppointmentsOneList(Map<String, Object> conditions);

	List<Appointment> queryAppointmentsInPageForTime(Integer page, Integer rows, Map<String, Object> conditions,
			List<String> blearParams, Map<String, ColumnCompator> compators);

	Integer countAppointmentsInPageForTime(Map<String, Object> conditions, List<String> blearParams, Map<String, ColumnCompator> compators);

	List<Appointment> queryAppointmentsOneList(Integer appCode, Integer appType, List<Integer> checkStatus);

	boolean insertAppointment(Appointment appointment);

	boolean updateAppointments(Map<String, Object> changeInfos, Map<String, Object> conditions);

	Appointment getAppointment(Map<String, Object> conditions);

	boolean updateAppointmentsAndGrantPower(Map<String, Object> changeInfos, Map<String, Object> conditions);
	
	List<Appointment> queryAppointTime(String beginTime, String endTime, Integer appCode);
	
	Integer countHistoryAppointment(String startTime, String endTime, Integer appCode);
	
	List<Map<String, Object>> queryHistoryAppointment(String startTime, String endTime, Integer appCode);
	
	Integer countAppointingByAppCode(Integer appCode);
	
	List<Map<String, Object>> queryAppointingByAppCode(Integer appCode);
}
